#if out a few things
authorFederico Mena Quintero <federico@gnome.org>
Thu, 17 Nov 2011 14:08:49 +0000 (08:08 -0600)
committerFederico Mena Quintero <federico@gnome.org>
Tue, 4 Sep 2012 01:55:59 +0000 (20:55 -0500)
gtk/gtkfilechooserdefault.c
gtk/gtkfilechooserprivate.h

index e52c48ac7460ae06ec1651de1f362766f8d482c0..e4c6192b22d29fa4d66f475772f2c5d862de85b8 100644 (file)
@@ -175,6 +175,7 @@ enum {
 
 static guint signals[LAST_SIGNAL] = { 0 };
 
+#if REMOVE_FOR_PLACES_SIDEBAR
 /* Column numbers for the shortcuts tree.  Keep these in sync with shortcuts_model_create() */
 enum {
   SHORTCUTS_COL_PIXBUF,
@@ -194,6 +195,7 @@ typedef enum {
   SHORTCUT_TYPE_SEARCH,
   SHORTCUT_TYPE_RECENT
 } ShortcutType;
+#endif
 
 #define MODEL_ATTRIBUTES "standard::name,standard::type,standard::display-name," \
                          "standard::is-hidden,standard::is-backup,standard::size," \
@@ -234,6 +236,7 @@ enum {
   GTK_TREE_MODEL_ROW,
 };
 
+#if REMOVE_FOR_PLACES_SIDEBAR
 /* Interesting places in the shortcuts bar */
 typedef enum {
   SHORTCUTS_SEARCH,
@@ -248,6 +251,7 @@ typedef enum {
   SHORTCUTS_CURRENT_FOLDER_SEPARATOR,
   SHORTCUTS_CURRENT_FOLDER
 } ShortcutsIndex;
+#endif
 
 /* Icon size for if we can't get it from the theme */
 #define FALLBACK_ICON_SIZE 16
@@ -440,6 +444,7 @@ static void     unset_file_system_backend    (GtkFileChooserDefault *impl);
 
 \f
 
+#if REMOVE_FOR_PLACES_SIDEBAR
 /* Drag and drop interface declarations */
 
 typedef struct {
@@ -466,6 +471,7 @@ G_DEFINE_TYPE_WITH_CODE (ShortcutsPaneModelFilter,
 static GtkTreeModel *shortcuts_pane_model_filter_new (GtkFileChooserDefault *impl,
                                                      GtkTreeModel          *child_model,
                                                      GtkTreePath           *root);
+#endif
 
 \f
 
@@ -726,6 +732,7 @@ gtk_file_chooser_embed_default_iface_init (GtkFileChooserEmbedIface *iface)
   iface->initial_focus = gtk_file_chooser_default_initial_focus;
 }
 
+#if REMOVE_FOR_PLACES_SIDEBAR
 static void
 bookmarks_changed_cb (gpointer data)
 {
@@ -733,6 +740,7 @@ bookmarks_changed_cb (gpointer data)
 
   volumes_bookmarks_changed_cb (impl->file_system, impl);
 }
+#endif
 
 static void
 _gtk_file_chooser_default_init (GtkFileChooserDefault *impl)
index 8fde7ba45b733f7bbca4da9f46090ceb540e6659..d4adbb7175ba97595ce1586caa38fbf814553944 100644 (file)
@@ -151,6 +151,8 @@ typedef enum {
   OPERATION_MODE_RECENT
 } OperationMode;
 
+#define REMOVE_FOR_PLACES_SIDEBAR 0
+
 struct _GtkFileChooserDefault
 {
   GtkBox parent_instance;
@@ -168,12 +170,14 @@ struct _GtkFileChooserDefault
   /* The file browsing widgets */
   GtkWidget *browse_widgets_box;
   GtkWidget *browse_header_box;
+#if REMOVE_FOR_PLACES_SIDEBAR
   GtkWidget *browse_shortcuts_tree_view;
   GtkWidget *browse_shortcuts_add_button;
   GtkWidget *browse_shortcuts_remove_button;
   GtkWidget *browse_shortcuts_popup_menu;
   GtkWidget *browse_shortcuts_popup_menu_remove_item;
   GtkWidget *browse_shortcuts_popup_menu_rename_item;
+#endif
   GtkWidget *browse_files_tree_view;
   GtkWidget *browse_files_popup_menu;
   GtkWidget *browse_files_popup_menu_add_shortcut_item;
@@ -222,10 +226,12 @@ struct _GtkFileChooserDefault
 
   GtkListStore *shortcuts_model;
 
+#if REMOVE_FOR_PLACES_SIDEBAR
   /* Filter for the shortcuts pane.  We filter out the "current folder" row and
    * the separator that we use for the "Save in folder" combo.
    */
   GtkTreeModel *shortcuts_pane_filter_model;
+#endif
   
   /* Handles */
   GSList *loading_shortcuts;